<div class="root">
    <nav-cart-bar :totalNum="totalNum" :title="isEditShow ? '完成' : '编辑'" @btnClick="editCartClick"></nav-cart-bar>

    <list ref="list" class="list-wrapper">
        <cell :class="['cell-panel',index==0 ? 'cell-panel-first' : '']" v-for="(c,index) in cartList" :key="c.sid">
            <cart-panel :shop="c" @checkShop="checkShop"></cart-panel>
            <cart-sales v-if="c.shop_sales" :shop="c"></cart-sales>

            <div class="goods-item" v-for="(g,index) in c.goods" :key="g.id">
                <cart-goods-item :ref="c.sid + '_' + index" :refId="c.sid + '_' + index" :goods="g" @swipeStart="onswipeStart" @swipeEnd="onswipeEnd" @checkGoods="checkGoods" @delGoods="delGoods" @updateGoods="updateGoods"></cart-goods-item>
            </div>
        </cell>

        <!--购物车为空-->
        <cell class="empty-cell" v-if="pageLoaded && !cartList.length">
            <content-empty :emptyTxt="'暂无商品 ~'"></content-empty>
        </cell>
    </list>

    <cart-footer-bar v-if="totalNum > 0" :isEditShow="isEditShow" :checkedAll="checkedAll" :totalCheckedNum="totalCheckedNum" :totalCheckedMoney="totalCheckedMoney" @checkAll="checkAll" @delEdit="delEdit" @goToConfirm="goToConfirm"></cart-footer-bar>
</div>